Optimal. Leaf size=187 \[ -\frac {b^2 \left (73 a^2-2 b^2\right ) \cos (c+d x)}{8 a d}-\frac {3 a \left (a^2-12 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{8 d}+\frac {3}{2} b x \left (2 a^2-b^2\right )+\frac {17 b \cot (c+d x) (a+b \sin (c+d x))^2}{8 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}+\frac {5 \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{8 d}-\frac {13 b^3 \sin (c+d x) \cos (c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.66, antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2893, 3047, 3033, 3023, 2735, 3770} \[ -\frac {b^2 \left (73 a^2-2 b^2\right ) \cos (c+d x)}{8 a d}-\frac {3 a \left (a^2-12 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{8 d}+\frac {3}{2} b x \left (2 a^2-b^2\right )+\frac {17 b \cot (c+d x) (a+b \sin (c+d x))^2}{8 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}+\frac {5 \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{8 d}-\frac {13 b^3 \sin (c+d x) \cos (c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2893
Rule 3023
Rule 3033
Rule 3047
Rule 3770
Rubi steps
\begin {align*} \int \cot ^4(c+d x) \csc (c+d x) (a+b \sin (c+d x))^3 \, dx &=-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}-\frac {\int \csc ^3(c+d x) (a+b \sin (c+d x))^3 \left (15 a^2+3 a b \sin (c+d x)-12 a^2 \sin ^2(c+d x)\right ) \, dx}{12 a^2}\\ &=\frac {5 \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{8 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}-\frac {\int \csc ^2(c+d x) (a+b \sin (c+d x))^2 \left (51 a^2 b-3 a \left (3 a^2-2 b^2\right ) \sin (c+d x)-54 a^2 b \sin ^2(c+d x)\right ) \, dx}{24 a^2}\\ &=\frac {17 b \cot (c+d x) (a+b \sin (c+d x))^2}{8 d}+\frac {5 \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{8 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}-\frac {\int \csc (c+d x) (a+b \sin (c+d x)) \left (-9 a^2 \left (a^2-12 b^2\right )-3 a b \left (21 a^2-2 b^2\right ) \sin (c+d x)-156 a^2 b^2 \sin ^2(c+d x)\right ) \, dx}{24 a^2}\\ &=-\frac {13 b^3 \cos (c+d x) \sin (c+d x)}{4 d}+\frac {17 b \cot (c+d x) (a+b \sin (c+d x))^2}{8 d}+\frac {5 \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{8 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}-\frac {\int \csc (c+d x) \left (-18 a^3 \left (a^2-12 b^2\right )-72 a^2 b \left (2 a^2-b^2\right ) \sin (c+d x)-6 a b^2 \left (73 a^2-2 b^2\right ) \sin ^2(c+d x)\right ) \, dx}{48 a^2}\\ &=-\frac {b^2 \left (73 a^2-2 b^2\right ) \cos (c+d x)}{8 a d}-\frac {13 b^3 \cos (c+d x) \sin (c+d x)}{4 d}+\frac {17 b \cot (c+d x) (a+b \sin (c+d x))^2}{8 d}+\frac {5 \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{8 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}-\frac {\int \csc (c+d x) \left (-18 a^3 \left (a^2-12 b^2\right )-72 a^2 b \left (2 a^2-b^2\right ) \sin (c+d x)\right ) \, dx}{48 a^2}\\ &=\frac {3}{2} b \left (2 a^2-b^2\right ) x-\frac {b^2 \left (73 a^2-2 b^2\right ) \cos (c+d x)}{8 a d}-\frac {13 b^3 \cos (c+d x) \sin (c+d x)}{4 d}+\frac {17 b \cot (c+d x) (a+b \sin (c+d x))^2}{8 d}+\frac {5 \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{8 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}+\frac {1}{8} \left (3 a \left (a^2-12 b^2\right )\right ) \int \csc (c+d x) \, dx\\ &=\frac {3}{2} b \left (2 a^2-b^2\right ) x-\frac {3 a \left (a^2-12 b^2\right ) \tanh ^{-1}(\cos (c+d x))}{8 d}-\frac {b^2 \left (73 a^2-2 b^2\right ) \cos (c+d x)}{8 a d}-\frac {13 b^3 \cos (c+d x) \sin (c+d x)}{4 d}+\frac {17 b \cot (c+d x) (a+b \sin (c+d x))^2}{8 d}+\frac {5 \cot (c+d x) \csc (c+d x) (a+b \sin (c+d x))^3}{8 d}-\frac {\cot (c+d x) \csc ^3(c+d x) (a+b \sin (c+d x))^4}{4 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 6.29, size = 381, normalized size = 2.04 \[ \frac {\left (5 a^3-12 a b^2\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {\left (12 a b^2-5 a^3\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{32 d}+\frac {3 \left (a^3-12 a b^2\right ) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {3 \left (a^3-12 a b^2\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{8 d}-\frac {a^3 \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a^3 \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {\csc \left (\frac {1}{2} (c+d x)\right ) \left (4 a^2 b \cos \left (\frac {1}{2} (c+d x)\right )-b^3 \cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {\sec \left (\frac {1}{2} (c+d x)\right ) \left (b^3 \sin \left (\frac {1}{2} (c+d x)\right )-4 a^2 b \sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {3 b \left (b^2-2 a^2\right ) (c+d x)}{2 d}-\frac {a^2 b \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a^2 b \tan \left (\frac {1}{2} (c+d x)\right ) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {3 a b^2 \cos (c+d x)}{d}-\frac {b^3 \sin (2 (c+d x))}{4 d} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.89, size = 331, normalized size = 1.77 \[ -\frac {48 \, a b^{2} \cos \left (d x + c\right )^{5} - 24 \, {\left (2 \, a^{2} b - b^{3}\right )} d x \cos \left (d x + c\right )^{4} + 48 \, {\left (2 \, a^{2} b - b^{3}\right )} d x \cos \left (d x + c\right )^{2} + 10 \, {\left (a^{3} - 12 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - 24 \, {\left (2 \, a^{2} b - b^{3}\right )} d x - 6 \, {\left (a^{3} - 12 \, a b^{2}\right )} \cos \left (d x + c\right ) + 3 \, {\left ({\left (a^{3} - 12 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} + a^{3} - 12 \, a b^{2} - 2 \, {\left (a^{3} - 12 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left ({\left (a^{3} - 12 \, a b^{2}\right )} \cos \left (d x + c\right )^{4} + a^{3} - 12 \, a b^{2} - 2 \, {\left (a^{3} - 12 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 8 \, {\left (b^{3} \cos \left (d x + c\right )^{5} + 4 \, {\left (2 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (2 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{16 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.33, size = 343, normalized size = 1.83 \[ \frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 8 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 8 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 120 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 32 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 96 \, {\left (2 \, a^{2} b - b^{3}\right )} {\left (d x + c\right )} + 24 \, {\left (a^{3} - 12 \, a b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {64 \, {\left (b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, a b^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}} - \frac {50 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 600 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 120 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 32 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 8 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{64 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.64, size = 316, normalized size = 1.69 \[ -\frac {a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{4 d \sin \left (d x +c \right )^{4}}+\frac {a^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{8 d \sin \left (d x +c \right )^{2}}+\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{8 d}+\frac {3 a^{3} \cos \left (d x +c \right )}{8 d}+\frac {3 a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{8 d}-\frac {a^{2} b \left (\cot ^{3}\left (d x +c \right )\right )}{d}+3 a^{2} b x +\frac {3 a^{2} b \cot \left (d x +c \right )}{d}+\frac {3 a^{2} b c}{d}-\frac {3 a \,b^{2} \left (\cos ^{5}\left (d x +c \right )\right )}{2 d \sin \left (d x +c \right )^{2}}-\frac {3 a \,b^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{2 d}-\frac {9 a \,b^{2} \cos \left (d x +c \right )}{2 d}-\frac {9 a \,b^{2} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2 d}-\frac {b^{3} \left (\cos ^{5}\left (d x +c \right )\right )}{d \sin \left (d x +c \right )}-\frac {b^{3} \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{d}-\frac {3 b^{3} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}-\frac {3 b^{3} x}{2}-\frac {3 b^{3} c}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.65, size = 212, normalized size = 1.13 \[ \frac {16 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} - 1}{\tan \left (d x + c\right )^{3}}\right )} a^{2} b - 8 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} + 2}{\tan \left (d x + c\right )^{3} + \tan \left (d x + c\right )}\right )} b^{3} - a^{3} {\left (\frac {2 \, {\left (5 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 12 \, a b^{2} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - 4 \, \cos \left (d x + c\right ) + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.50, size = 699, normalized size = 3.74 \[ \frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{64\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {3\,a\,b^2}{8}-\frac {a^3}{8}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (6\,a\,b^2-\frac {3\,a^3}{2}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (102\,a\,b^2-2\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (108\,a\,b^2-\frac {15\,a^3}{4}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (26\,a^2\,b-8\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (30\,a^2\,b+8\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (58\,a^2\,b-32\,b^3\right )+\frac {a^3}{4}+2\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {15\,a^2\,b}{8}-\frac {b^3}{2}\right )}{d}+\frac {3\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (a^2-12\,b^2\right )}{8\,d}+\frac {a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{8\,d}-\frac {3\,b\,\mathrm {atan}\left (\frac {\frac {3\,b\,\left (2\,a^2-b^2\right )\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (9\,a\,b^2-\frac {3\,a^3}{4}\right )-6\,a^2\,b+3\,b^3-b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2-b^2\right )\,9{}\mathrm {i}\right )}{2}+\frac {3\,b\,\left (2\,a^2-b^2\right )\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (9\,a\,b^2-\frac {3\,a^3}{4}\right )-6\,a^2\,b+3\,b^3+b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2-b^2\right )\,9{}\mathrm {i}\right )}{2}}{2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (36\,a^4\,b^2-36\,a^2\,b^4+9\,b^6\right )+27\,a\,b^5+\frac {9\,a^5\,b}{2}-\frac {225\,a^3\,b^3}{4}-\frac {b\,\left (2\,a^2-b^2\right )\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (9\,a\,b^2-\frac {3\,a^3}{4}\right )-6\,a^2\,b+3\,b^3-b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2-b^2\right )\,9{}\mathrm {i}\right )\,3{}\mathrm {i}}{2}+\frac {b\,\left (2\,a^2-b^2\right )\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (9\,a\,b^2-\frac {3\,a^3}{4}\right )-6\,a^2\,b+3\,b^3+b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2-b^2\right )\,9{}\mathrm {i}\right )\,3{}\mathrm {i}}{2}}\right )\,\left (2\,a^2-b^2\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________